package org.goobs.gui;

import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLabel;

public class GridGui {
	
	private Grid g;
	private final JComponent[][] widgets;
	
	public GridGui(Grid g){
		widgets = new JComponent[g.numRows()][g.numCols()];
	}
	
	
	
	public void show(){
		javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGUI();
            }
        });
	}
	
	private final void createAndShowGUI(){
		//Create and set up the window.
        JFrame frame = new JFrame("HelloWorldSwing");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        //Add the ubiquitous "Hello World" label.
        JLabel label = new JLabel("Hello World");
        frame.getContentPane().add(label);

        //Display the window.
        frame.pack();
        frame.setVisible(true);
	}

    public static void main(String[] args) {
    	int[] rows = {10, 20};
    	int[] cols = {40, 100};
        Grid test = new Grid(rows, cols);
        GridGui gui = new GridGui(test);
        gui.show();
    }

}
